Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This sets up linting on the React side. Mainly following information from https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project and facebook/create-react-app#8849
Add the following to your VSCode settings.json file to automatically apply linter fixes when you save files
Note that the .env file for the client side is committed to the repo as described at https://create-react-app.dev/docs/adding-custom-environment-variables/
Secret variables must not be added to this file, as they will be visible in the final build of the client.
This PR also adds a pre-commit hook to run the linter. It will fix automatically any files it can, but anything that it can't fix automatically will cause the commit to fail until you fix them manually.
Additionally, I had to set up lint-staged differently because of running two separate packages, client and server. I followed instructions at https://github.com/sudo-suhas/lint-staged-multi-pkg